using IQIGame.Onigao.Framework;
using IQIGame.Onigao.Game;

namespace IQIGame.Onigao.GamePlay
{
    public partial class CFSMBlackBoard : ICFSMBlackboard
    {
        public BaseConditionFunc CreateConditionFunc(string fsmName, string name)
        {
            BaseConditionFunc obj = null;
            #region auto generation condition func
            switch (fsmName)
            {
                case "Level/Logic/Monster":
                    switch (name)
                    {
                        case "AlertValue":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_AlertValue>();
                            break;
                        case "IsCloseToHero":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_IsCloseToHero>();
                            break;
                        case "IsHeroInPhysicalArea":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_IsHeroInPhysicalArea>();
                            break;
                        case "IsHeroInSight":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_IsHeroInSight>();
                            break;
                        case "IsReturningToPost":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_IsReturningToPost>();
                            break;
                        case "SqrDisToChaseStart":
                            obj = ClassPool.Get<CFSMCond_Level_Logic_Monster_SqrDisToChaseStart>();
                            break;

                        default:
                            break;
                    }
                    break;

                default:
                    break;
            }
            #endregion
            return obj;
        }

        public BaseCFSMState CreateState(string fsmName, string name)
        {
            BaseCFSMState obj = null;
            #region auto generation state
            switch (fsmName)
            {
                case "Level/Logic/Monster":
                    switch (name)
                    {
                        case "Alert":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_Alert>();
                            break;
                        case "Attack":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_Attack>();
                            break;
                        case "Born":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_Born>();
                            break;
                        case "Chase":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_Chase>();
                            break;
                        case "Patrol":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_Patrol>();
                            break;
                        case "ReturnToPost":
                            obj = ClassPool.Get<CFSMState_Level_Logic_Monster_ReturnToPost>();
                            break;

                        default:
                            break;
                    }
                    break;

                default:
                    break;
            }
            #endregion
            return obj;
        }
    }
}